package com.sgchen.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sgchen.demo.entity.po.AccountPo;
import com.sgchen.demo.entity.po.ChildAccountPo;
import com.sgchen.security.annotation.EncryptParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AccountMapper extends BaseMapper<AccountPo> {


    /**
     * 通过账户名修改密码
     */
    void updatePasswordByAccount(@EncryptParam("account") @Param("account") String account
            , @EncryptParam("password") @Param("password") String password);

    List<AccountPo> getInfoByAccount(@EncryptParam("account") @Param("account") String account);

    List<ChildAccountPo> listByFilter(@Param("entity") AccountPo accountPo);
}
